package day4.HomeWork;

/**
 * ClassName：Test6
 *
 * @Author：小鱼
 * @Create：2025-08-07 16:54
 */
public class Test6 {
    public static void main(String[] args) {
        String s1 = "helloworld";
        String s2 = "hello";
        String s3 = "world";
        String s4 = "hello" + "world";
        String s5 = s2 + s3;
        String s6 = new String("helloword");
        String s7 = "hello" + new String("world");
        System.out.println(s1 == s4);//true
        System.out.println(s1 == s5);//false
        System.out.println(s1 == s6);//false
        System.out.println(s1 == s7);//false
    }
}
